/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mysweethome.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author BKC
 */
@Entity
@Table(name = "Administrator", catalog = "MySweetHomeDB", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "Administrator.findAll", query = "SELECT a FROM Administrator a"),
    @NamedQuery(name = "Administrator.findByAccountID", query = "SELECT a FROM Administrator a WHERE a.accountID = :accountID"),
    @NamedQuery(name = "Administrator.findByUsername", query = "SELECT a FROM Administrator a WHERE a.username = :username"),
    @NamedQuery(name = "Administrator.findByPhone", query = "SELECT a FROM Administrator a WHERE a.phone = :phone"),
    @NamedQuery(name = "Administrator.findByEmail", query = "SELECT a FROM Administrator a WHERE a.email = :email"),
    @NamedQuery(name = "Administrator.findByFullName", query = "SELECT a FROM Administrator a WHERE a.fullName = :fullName"),
    @NamedQuery(name = "Administrator.findByCanLock", query = "SELECT a FROM Administrator a WHERE a.canLock = :canLock"),
    @NamedQuery(name = "Administrator.findByPassword", query = "SELECT a FROM Administrator a WHERE a.password = :password"),
    @NamedQuery(name = "Administrator.findByCanCreate", query = "SELECT a FROM Administrator a WHERE a.canCreate = :canCreate"),
    @NamedQuery(name = "Administrator.findByIsLocked", query = "SELECT a FROM Administrator a WHERE a.isLocked = :isLocked")})
public class Administrator implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "AccountID")
    private Integer accountID;
    @Basic(optional = false)
    @Column(name = "Username")
    private String username;
    @Column(name = "Phone")
    private String phone;
    @Basic(optional = false)
    @Column(name = "Email")
    private String email;
    @Basic(optional = false)
    @Column(name = "FullName")
    private String fullName;
    @Basic(optional = false)
    @Column(name = "CanLock")
    private boolean canLock;
    @Basic(optional = false)
    @Column(name = "Password")
    private String password;
    @Basic(optional = false)
    @Column(name = "CanCreate")
    private boolean canCreate;
    @Basic(optional = false)
    @Column(name = "IsLocked")
    private boolean isLocked;

    public Administrator() {
    }

    public Administrator(Integer accountID) {
        this.accountID = accountID;
    }

    public Administrator(Integer accountID, String username, String email, String fullName, boolean canLock, String password, boolean canCreate, boolean isLocked) {
        this.accountID = accountID;
        this.username = username;
        this.email = email;
        this.fullName = fullName;
        this.canLock = canLock;
        this.password = password;
        this.canCreate = canCreate;
        this.isLocked = isLocked;
    }

    public Integer getAccountID() {
        return accountID;
    }

    public void setAccountID(Integer accountID) {
        this.accountID = accountID;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public boolean getCanLock() {
        return canLock;
    }

    public void setCanLock(boolean canLock) {
        this.canLock = canLock;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean getCanCreate() {
        return canCreate;
    }

    public void setCanCreate(boolean canCreate) {
        this.canCreate = canCreate;
    }

    public boolean getIsLocked() {
        return isLocked;
    }

    public void setIsLocked(boolean isLocked) {
        this.isLocked = isLocked;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (accountID != null ? accountID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Administrator)) {
            return false;
        }
        Administrator other = (Administrator) object;
        if ((this.accountID == null && other.accountID != null) || (this.accountID != null && !this.accountID.equals(other.accountID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mysweethome.entities.Administrator[accountID=" + accountID + "]";
    }

}
